<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\admin\controller;
use App\AccountLog;
use app\common\model\AppAccountLog;
use app\common\model\ApplicationOrder;

use think\Db;

/**
 * 配置控制器
 */
class ApplicationClass extends AdminBase
{

    public function ApplicationClassList()
    {

        $where = $this->logicApplicationClass->getWhere($this->param);

        $this->assign('list', $this->logicApplicationClass->getApplicationClassList($where, 'a.*', 'a.create_time asc'));

        return $this->fetch('applicationclass_list');
    }

    /**
     * ApplicationClass添加
     */
    public function ApplicationClassAdd()
    {

        $this->ApplicationClassCommon();


        return $this->fetch('applicationclass_edit');
    }



    /**
     * ApplicationClass编辑
     */
    public function ApplicationClassEdit()
    {

        $this->ApplicationClassCommon();

        $info = $this->logicApplicationClass->getApplicationClassInfo(['a.id' => $this->param['id']], 'a.*');


        $this->assign('info', $info);
//        $this->assign('class',$this->logicApplicationClass->getApplicationClassList()['list']);
        return $this->fetch('applicationclass_edit');
    }

    /**
     * Application添加与编辑通用方法
     */
    public function ApplicationClassCommon()
    {

        IS_POST && $this->jump($this->logicApplicationClass->ApplicationClassEdit($_POST));
    }




}
